#include <iostream>
template <class T>
class TreeNode{
    T key;
    TreeNode<T>* LT;
    TreeNode<T>* RT;
    TreeNode(T value){
        key = value;
        LT = NULL;
        RT = NULL;}
};
template <class T>
void printTree(TreeNode <T> *t){
    if (t==NULL) return; 
    std::cout<<t->key<<"(";
    printTree(t->LT);
    if (t->RT!=NULL)std::cout<<",";
    printTree(t->RT);
    std::cout<<")"; 
}
int main(){
    TreeNode<int> *root;
    printTree(root);
    return 0;
}